package com.zerui.manager.app.openplan.executer;

import com.alibaba.cola.catchlog.CatchAndLog;
import com.zerui.cola.dto.Response;
import com.zerui.manager.openplan.gateway.OpenPlanGateWay;
import com.zerui.manager.web.cmd.OpenPlanDeviceAddCmd;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

/**
 * @Author wh
 * @create_time 2023-08-23 11:08
 */
@Component
@CatchAndLog
public class OpenPlanDeviceDelCmdExe {

	@Resource
	private OpenPlanGateWay openPlanGateWay;

	public Response execute(OpenPlanDeviceAddCmd openPlanDeviceAddCmd) {
		return openPlanGateWay.deleteOpenPlanDevice(openPlanDeviceAddCmd);
	}

    public void executeById(Long deviceId) {
		openPlanGateWay.deleteDeviceById(deviceId);
    }
}
